package com.renting.modules.renting.share.web;

import com.renting.modules.renting.rentSys.entity.House;
import com.renting.modules.renting.share.entity.ShareItem;
import com.renting.modules.renting.share.service.ShareItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.websocket.server.PathParam;

@Controller
public class ShareServiceController {

    @Autowired
    private ShareItemService shareItemService;

    /**
     * 列出合租列表
     */
    @RequestMapping(value = "v1/share/id/{id}",method = RequestMethod.GET)
    @ResponseBody
    public String findById(ShareItem shareItem) {

        return shareItemService.findById(shareItem.getId());
    }
}
